
public class Deom03 {
	public static void main(String[] args) {
		int []a= {1,2,3,4,5,6,7,8,9};
		int[] x=zui(a);
		System.out.println(x[0]);
		System.out.println(x[1]);
		
		
	
	}
	public static int[] zui(int []a) {
		int max=a[0];
		int min=a[0];
		for (int i=0;i<9;i++) {
			if(max<a[i]) {
				max=a[i];
			}
		}
		for(int i=0;i<9;i++) {
			if(min>a[i]) {
				min=a[i];
			}
		}
		int []b=new int[2];
		b[0]=max;
		b[1]=min;
	
		return b;
	}
}
